package com.woniuxy.oop;

/**
 * description: TestInnerClass <br>
 * date: 2022/1/31 11:55 下午 <br>
 * author: shesaifei <br>
 * version: 1.0 <br>
 */
public class TestInnerClass {
    public static void main(String[] args) {
        Outer.Inner outer = new Outer().new Inner();
        outer.show();
    }
}

class Outer {
    private int age = 10;

    class Inner {
        private int age = 20;

        public void show() {
            int age = 30;
            System.out.println("外部类的成员变量age:" + Outer.this.age);
            System.out.println(this.age);
            System.out.println(age);
        }
    }


}